<?php
/** 
 * @uses 		基础Controller
 * @author 		Duan
 * @version 	1.0
 * @copyright	Yihuan							  
 */
namespace 	Common\Controller;

use 	 	Think\Controller;

class BaseController extends Controller
{

	protected static $message 	= [ 	//输出总返回
		200 	=> 'http通过',
		201 	=> '签名错误',
 		202 	=> '医院Id不正确',
 		203 	=> '缺少Token',
 		301 	=> 'redis不能正常连接',
 		302 	=> 'redis扩展未安装',
 		404 	=> '没有此方法',
	];


	/**
	 * @uses  	json公共输出
	 * @param 	$code 错误码
	 * @return 	void
	 */
	protected function jsonResult($code)
	{
		echo json_encode(['code' => $code , 'message' => self::$message[$code]] , JSON_UNESCAPED_UNICODE);die;
	}


}